package cn.dust.design.pattern.behavioral.command;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: dust
 * @Date: 2019/11/28 17:27
 */
public class Staff {
    private List<Command> commandList=new ArrayList<Command>();

    public void addCommane(Command command){
        commandList.add(command);
    }

    public void executeCommands(){
        for(Command command:commandList){
            command.execute();
        }
        commandList.clear();
    }


}
